package com.chanyachting.emall.action.companyproduct;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.chanyachting.emall.domain.Sellyacht;
import com.chanyachting.emall.form.SellyachtForm;
import com.chanyachting.emall.service.SellyachtService;
import com.chanyachting.emall.serviceImpl.SellyachtServiceImpl;


//创建游艇销售
public class EditSellyachtAction extends Action {

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
		SellyachtForm syform=(SellyachtForm)form;
		
		Sellyacht sy= null;
		try {
			
			SellyachtService cpservice=new SellyachtServiceImpl();
			
			sy = cpservice.QueryOneSellyacht(syform.getId().toString());
			
		} catch (Exception e) {
			
			e.printStackTrace();
		}
		syform.setSellyacht(sy);
		
		return mapping.findForward("editSellyacht");
	}
	
	
	

}
